package it.uniroma2.structure;

import java.io.Serializable;


//Represents the ontology type ( Flow_Parameter, Internal_Parameter, External_Parameter )
public class Parameter implements Serializable{
	
	String name;
	String type;
	String typeParameter;
	String fixedValue;
	private String part;
	private String element;
	private Variable variable;
	
	public Parameter(String name){
		this.name = name;
	}
	
	public Parameter(String name, String type){
		this(name);
		this.type = type;
	}

	public String getName() {
		return name;
	}
	
	public String getType(){
		return this.type;
	}

	public String getTypeParameter(){
		return this.typeParameter;
	}

	public String getValue(){
		return this.fixedValue;
	}
	
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof Parameter){
			if(name.equalsIgnoreCase(((Parameter) obj).getName()) &&
			   type.equalsIgnoreCase(((Parameter) obj).getType()) &&
			   typeParameter.equalsIgnoreCase(((Parameter) obj).getTypeParameter()) 
//			   &&
//			   fixedValue.equalsIgnoreCase(((Parameter) obj).getValue())
					)
			{
				return true;
			}else{
				return false;
			}
		}else{
			return false;
		}
	}

	public void setVariable(Variable var) {
		this.variable = var;
		
	}
	
	public void setParameterType(String parType){
		this.typeParameter = parType;
	}
	
	public Variable getVariable() {
		return this.variable;
		
	}
	
	
}
